package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.MusicDAO;
import domain.Music;
import service.IMusicService;

@Service
public class MusicService implements IMusicService {
	@Autowired
	private MusicDAO dao;

	public List<Music> listAll(Integer startPage, Integer pageSize) {
		return dao.listAll(startPage,pageSize);
	}

	public Integer addMusic(Music music) {
		return dao.addMusic(music);
	}

	public Integer deleteMusic(Long id) { //这个删除只是删除了数据库里面的路径，但是真实的文件并没有删除
		return dao.deleteMusic(id);
	}
}
